/**
 * Created by zhang_renyang on 15/1/4.
 */
var dateUtils = require('../utils/dateUtils');
var mongoose = require('mongoose');

var Schema = mongoose.Schema,
    ObjectId = Schema.ObjectId,
    articleSchema = new Schema({
        articleTitle:String,
        functionDescription:String,
        user_id:{type:ObjectId,ref:'User'},
        articleExamples:String,
        jobInterview:String,
        create_time:Date,
        update_time:Date,
        visit_count:Number,
        reply_count:Number,
        category_id:{type:ObjectId,ref:'Category'},
        order_by:{type:Number,default:0},
        is_recommend:{type:Boolean,default:false}
    },{collection:"article"});
var articleModel = mongoose.model('Article',articleSchema);
module.exports= articleModel;